<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:p="http://primefaces.org/ui"
    xmlns:pm="http://primefaces.org/mobile">
    
    <f:view renderKitId="PRIMEFACES_MOBILE" />
    
    
    <h:head>
		<link rel="stylesheet"
				href="#{request.contextPath}/resources/css/hotellie.css"/>
		<link rel="stylesheet"
				href="#{request.contextPath}/resources/css/bootstrap.css"/>
		<link rel="stylesheet"
				href="#{request.contextPath}/resources/css/font-awesome.css"/>
    </h:head>
   
   
    
    <h:body>
        
        <pm:page id="dealView">
            
            <pm:content style="padding:0em;">
                            		<h:outputText  value="Welcome #{facebookBean.pullUserInfo()}" style="display:none;"   />
            
            <link href='http://fonts.googleapis.com/css?family=Roboto+Condensed' rel='stylesheet' type='text/css'/>
            <style>
      		    .facilities .fa{
      		    	margin-left:1em;
      		    }
      		    
            </style>
                <h:form id="main1">
          		<div class="row headerRow">
          			<div class="col-xs-2">
          				<a href="#panel-1" data-role="button" data-icon="bars" data-iconpos="notext" data-inline="true"></a>
						<div data-role="panel" id="panel-1" data-display="overlay">
							<ul data-role="listview" id="listview-1">
								<li><a href="#{request.contextPath}/index.xhtml">Home</a></li>
							</ul>
						</div>
          			</div>
					<h:panelGrid columns="2" style="width:80%">
					     <p:commandLink action="/index.xhtml?faces-redirect=true">
							<h3>Hotellie</h3>
						</p:commandLink>
						
					</h:panelGrid>

          		</div>
          		</h:form>
          		<h:form id="main">
                 <p:panel styleClass="noHeader hotelFullView">     
                    <p:outputPanel id="viewDealId" autoUpdate="true">
                      	    <h3 style="text-align: center;">#{searchView.dealView.dealData.deal.dealName}</h3>
                      	    <div class="row">
                      	    	<div class="thumbnail right-caption col-xs-12 fullView">
                      	    		<div class="boxHeader">
                      	    			<h:outputLabel value="#{searchView.dealView.dealData.hotel.name}" styleClass="offer"/>
                      	    			<h:outputLabel value="20 days left" styleClass="daysLeft"/>
                      	    		</div>
                      	    		 <div class="row">
		                      	    	<div class="col-xs-6" style="padding:0">
	                      	    			<img class="col-xs-12" src="#{request.contextPath}/resources/image/h1.jpg" alt="..."/>
	                      	    		</div>
	                      	    		<div class="col-xs-6">
	                      	    			<p><b>#{searchView.dealView.dealData.availableForBooking}</b> Available/	
	                      	    			<p:commandLink  action="/deal/dealTransactions.xhtml?faces-redirect=true">                      	    			
	                      	    			    <b>#{searchView.dealView.dealData.alreadyBooked}</b> sold
	                      	    			</p:commandLink>
	                      	    			</p>
	                      	    			<div class="facilities row">
												<i class="fa fa-car"></i>
												<i class="fa fa-wifi"></i>
												<i class="fa fa-cutlery"></i>
												<i class="fa fa-plus-square"></i>
											</div>
	                      	    		</div>
		                      	    </div>
		                      	    <div class="row">
		                      	       Booking confirmed
		                      	    </div>
		                      	    <div class="row">
		                      	       Check In Date :<h:outputText value="#{searchView.dealView.dealData.fromDate}" > 
														<f:convertDateTime pattern="MM/dd/yyyy" />
		  											  </h:outputText> 
		                      	    </div>
		                      	     <div class="row">
		                      	       Check Out Date :<h:outputText value="#{searchView.dealView.dealData.toDate}" > 
														<f:convertDateTime pattern="MM/dd/yyyy" />
		  											  </h:outputText>
		                      	    </div>
		                      	    
		                      	    <div class="row">
		                      	       Total Cost : $#{searchView.dealView.dealData.totalCost}
		                      	    </div>
		                      	    
		                      	    <div class="row">
                                       Deal URL :   #{searchView.dealView.dealData.dealUrl}
		                      	    </div>
		                  
		                      	       <div class="row">
                			<p:commandLink id="facebookBtn" 
								action="#{facebookBean.prepareMessageForFbPosting()}" styleClass="fbLogin" ajax="false"  actionListener="#{facebookNavgiation.setFromDealPage(true)}">
								<i class="fa fa-facebook-square"></i> Post Deal On Facebook 
							</p:commandLink>
							<h:outputText value="Deal Posted" rendered="#{facebookBean.dealPostedOnFb eq true}" style="float:right;color:green"/>
		                      	    </div>
		                      	    
		                      	    <div class="row">
		                      	    	<h:outputLabel value="Deal Details:" />
		                      	    	<div class="col-xs-1"></div>
		                      	    	<div class="col-xs-9">
		                      	    	    <h:outputLabel value="#{searchView.dealView.liveDealCriterionsinHTML}" escape="false" rendered="#{searchView.dealView.offer eq true}"/>
		                      	    	    <h:outputLabel value="Total Offer #{searchView.dealView.totalOffer}%" escape="false" rendered="#{searchView.dealView.offer eq false}"/>
		                      	    	</div>
		                      	    </div>
		                      	   
		                      	  
                      	    	</div>
                      	    </div>
                     </p:outputPanel> 
                  </p:panel>
                </h:form>
            </pm:content>
            
        </pm:page>

    </h:body>
    
</html>